requirejs.config

  baseUrl: './build',

  paths:
    ioc: 'vendor/require/ioc'
    profmk: 'vendor/profmk'
    text: 'vendor/require/text'
    i18n: 'vendor/require/i18n'
    jquery: 'vendor/jquery'
    handlebars: 'vendor/handlebars'
    underscore: 'vendor/underscore'
    backbone: 'vendor/backbone'
    knockout: 'vendor/knockout'
    knockback: 'vendor/knockback'
    bootstrap: 'vendor/bootstrap'
    fizz: 'vendor/fizz'

  shim:
    jquery:
      exports: '$'

    bootstrap:
      deps: ['jquery']

    handlebars:
      exports: 'Handlebars'

    underscore:
      exports: '_'

    backbone:
      exports: 'Backbone'
      deps: ['jquery', 'underscore']

    knockout:
      exports: 'ko'

    knockback:
      exports: 'kb'
      deps: ['backbone', 'knockout']

  ioc:
      
    appLayout:
      module: 'layout/BootstrapLayout'
      inject:
        template: '=>template/layout/appLayout.js'
        messages: '=>i18n!nls/messages'

    loginLayout:
      module: 'layout/BootstrapLayout'
      inject:
        template: '=>template/layout/loginLayout.js'
        messages: '=>i18n!nls/messages'
   
    homeView:
      module: 'fizz.View'
      inject:
        el: '#page'
        template: '=>template/home.js'
        messages: '=>i18n!nls/messages'
        
    topmenuView:
      module: 'view/MenuView'
      inject:
        el: '#topmenu'
        containerElemType: 'span'
        template: '=>template/topmenu.js'
        messages: '=>i18n!nls/messages'
        
    leftmenuView:
      module: 'view/MenuView'
      inject:
        el: '#leftmenu'
        containerElemType: 'span'
        template: '=>template/leftmenu.js'
        messages: '=>i18n!nls/messages'

    loginView:
      module: 'view/LoginView'
      inject:
        el: '#page'
        template: '=>template/login.js'
        messages: '=>i18n!nls/messages'

    workspaceCrudView:
      module: 'view/CrudView'
      inject:
        el: '#page'
        routeToNavigate: '/workspaces'
        collection: '=>ioc!collection/Workspaces'
        template: '=>template/workspaceCrud.js'
        messages: '=>i18n!nls/messages'
        addSuccessMessage: 'workspace.view.add.success'
        addErrorMessage: 'workspace.view.add.error'
        editSuccessMessage: 'workspace.view.edit.success'
        editErrorMessage: 'workspace.view.edit.error'
        deleteSuccessMessage: 'workspace.view.delete.success'
        deleteErrorMessage: 'workspace.view.delete.error'

    workspaceListView:
      module: 'view/ListView'
      inject:
        el: '#page'
        routeToNavigate: '/workspaces'
        collection: '=>ioc!collection/Workspaces'
        template: '=>template/workspaceList.js'
        numPerPage: 3
        messages: '=>i18n!nls/messages'
        searchModel: '=>ioc!model/Search|prototype'

    userCrudView:
      module: 'view/UserCrudView'
      inject:
        el: '#page'
        routeToNavigate: '/users'
        collection: '=>ioc!collection/Users'
        template: '=>template/userCrud.js'
        messages: '=>i18n!nls/messages'
        addSuccessMessage: 'user.view.add.success'
        addErrorMessage: 'user.view.add.error'
        editSuccessMessage: 'user.view.edit.success'
        editErrorMessage: 'user.view.edit.error'
        deleteSuccessMessage: 'user.view.delete.success'
        deleteErrorMessage: 'user.view.delete.error'

    userListView:
      module: 'view/ListView'
      inject:
        el: '#page'
        routeToNavigate: '/users'
        collection: '=>ioc!collection/Users'
        template: '=>template/userList.js'
        numPerPage: 3
        messages: '=>i18n!nls/messages'
        searchModel: '=>ioc!model/Search|prototype'

    roleCrudView:
      module: 'view/CrudView'
      inject:
        el: '#page'
        routeToNavigate: '/roles'
        collection: '=>ioc!collection/Roles'
        template: '=>template/roleCrud.js'
        messages: '=>i18n!nls/messages'
        addSuccessMessage: 'role.view.add.success'
        addErrorMessage: 'role.view.add.error'
        editSuccessMessage: 'role.view.edit.success'
        editErrorMessage: 'role.view.edit.error'
        deleteSuccessMessage: 'role.view.delete.success'
        deleteErrorMessage: 'role.view.delete.error'

    roleListView:
      module: 'view/ListView'
      inject:
        el: '#page'
        routeToNavigate: '/roles'
        collection: '=>ioc!collection/Roles'
        template: '=>template/roleList.js'
        numPerPage: 3
        messages: '=>i18n!nls/messages'
        searchModel: '=>ioc!model/Search|prototype'

  deps: ['bootstrap', 'utils/hbs-helpers']
  urlArgs: 'v=0.0.1'

require ['ioc!App'], (app) ->
  app.start emulateHTTP: true
